Mac下Sublime Text3 Python开发环境的配置
Mac 下查看Python路径的方法:
1.terminal :
which python2.terminal:
python - import sys - print sys.path设置Sublime Text的语法:
View - syntax - python设置默认编译环境(默认版本2.7)
Tools - Build System - Python添加Python3.5编译环境(如果需要)
Tools - Butld System - New Build System在打开的文件中贴上以下代码:其中:cmd 后面为你的Python路径:
12345{"cmd": ["/Library/Frameworks/Python.framework/Versions/3.5/bin/python3", "-u", "$file"],"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)","selector": "source.python"}
测试并编译
print ('hello world')然后
command + s保存command + B编译,下面有输出结果即为成功。